#include <stdio.h>
#include <math.h>

#ifndef __MAIN_H__
#define __MAIN_H__
enum complex_type {
    RECTANGULAR = 1,
    POLAR
};
 
struct complex_struct {
    enum complex_type type;
    double x,y;
};
 
int printComplex(struct complex_struct c);
double real_part(struct complex_struct c);
double image_part(struct complex_struct c);
double magnitude(struct complex_struct c);
double angle(struct complex_struct c);
struct complex_struct add(struct complex_struct c, struct complex_struct d);
struct complex_struct sub(struct complex_struct c, struct complex_struct d);
struct complex_struct mult(struct complex_struct c, struct complex_struct d);
struct complex_struct div(struct complex_struct c, struct complex_struct d);
struct complex_struct make_from_real_image(double x, double y);
struct complex_struct make_from_magn_angle(double r, double a);
#endif